﻿@namespace MudBlazor.UnitTests.TestComponents

<MudDataGrid Items="@_items" @bind-RowsPerPage="BoundRowsPerPage">
    <Columns>
        <PropertyColumn Property="x => x.Name" />
    </Columns>
    <PagerContent>
        <MudDataGridPager />
    </PagerContent>
</MudDataGrid>

@code {
    private List<Item> _items = new List<Item>();

    public int BoundRowsPerPage = 5;

    protected override void OnInitialized()
    {
        for (var i = 0; i < 20; i++)
        {
            _items.Add(new Item(i.ToString()));
        }
    }

    public class Item
    {
        public string Name { get; set; }

        public Item(string name)
        {
            Name = name;
        }
    }

}
